<template>
  <nm-form-dialog ref="form" v-bind="form" v-on="on" :visible.sync="visible_">
    <el-row>
      <el-col :span="20" :offset="1">
        <el-form-item label="标题：" prop="title">
          <el-input v-model="form.model.title" clearable />
        </el-form-item>
        <el-form-item label="微信应用ID：" prop="appId">
          <el-input v-model="form.model.appId" clearable />
        </el-form-item>
        <el-form-item label="微信应用密钥：" prop="appSecret">
          <el-input v-model="form.model.appSecret" clearable />
        </el-form-item>
      </el-col>
    </el-row>
  </nm-form-dialog>
</template>
<script>
import { mixins } from 'nbmodular-ui'

const { add, edit, update } = $api.weChat.weChat

export default {
  mixins: [mixins.formSave],
  data() {
    return {
      title: '微信配置管理',
      actions: { add, edit, update },
      form: {
        model: {
          /** 标题 */
          title: '',
          /** 微信应用ID */
          appId: '',
          /** 微信应用密钥 */
          appSecret: ''
        },
        rules: {}
      }
    }
  }
}
</script>
